<template>
  <div class="app-container">
    <el-card class="content-edit">
      <div slot="header">
        <div>{{ info['title'] }}</div>
        <div>{{ info['typeText'] }}</div>
      </div>
      <div v-html="info['content']">{{ info['content'] }}</div>
    </el-card>
  </div>
</template>

<script>
  export default {
    name: 'InstructionsSublistDetails',
    data() {
      return {
        info: {
          // 文章标题
          title: '',
          // 所属栏目
          typeId: null,
          // 文章内容
          content: ''
        }
      }
    },
    mounted(){
      this.info['id'] = this.$router.currentRoute.query['id'] || '';
      this.loadData();
    },
    methods: {
      // 加载用户信息
      loadData() {
        (async () => {
          const result = await this.$service.applicationGetArticleDetails({id: this.info['id']});
          if (result.code === 0) {
            const data = result.data || {};
            Object.assign(this.info, data);
          }
        })();
      }
    }
  }
</script>
